<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Scrollable Background Image Example</title>
    <link rel="stylesheet" href="cdn/bootstrap.min.css">
    <style>
        body, html {
            margin: 0;
            padding: 0;
            width: 100%;
            height: 100%;
        }

        .background {
            background-image: url('./img/7 拷贝.png');
            background-size: 100% auto;
            background-repeat: no-repeat;
            background-position: top center;
            width: 1513px;
            height: calc(1513px * (5023 / 1920)); /* 假设背景图的宽 高比例为16:9 */
        }

        .content {
            color: white;
            text-align: center;
            padding: 20px;
            background-color: rgba(0, 0, 0, 0.5);
            margin: 20px auto;
            width: 80%;
        }
    </style>
</head>
<body>
<div class="background">
    <header>
        <nav class="navbar navbar-expand-lg navbar-light">
            <div class="navbar-brand" href="#"></div>

            <div class="collapse navbar-collapse" id="navbarNav">
                <ul class="navbar-nav ml-auto">
                    <li class="nav-item ">
                        <a class="nav-link" href="index.html">首页</a>
                    </li>
                    <li class="nav-item active">
                        <a class="nav-link" href="history.html">历史</a>
                    </li>
                    <li class="nav-item">
                        <a class="nav-link" href="faction.html">派别<span class="sr-only">(current)</span></a>
                    </li>
                    <li class="nav-item">
                        <a class="nav-link" href="painting.html">名画</a>
                    </li>
                 </ul>
            </div>
        </nav>
    </header>
    <div class="content">
        <h1>Welcome to My Website</h1>
        <p>This is a sample page with a background image.</p>
    </div>
    <div class="content">
        <h2>Section 1</h2>
        <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Curabitur et erat nec nisl fermentum vehicula.</p>
    </div>
    <div class="content">
        <h2>Section 2</h2>
        <p>Sed ut perspiciatis unde omnis iste natus error sit voluptatem accusantium doloremque laudantium.</p>
    </div>
    <div class="content">
        <h2>Section 3</h2>
        <p>At vero eos et accusamus et iusto odio dignissimos ducimus qui blanditiis praesentium voluptatum deleniti
            atque corrupti.</p>
    </div>
</div>
</body>
</html>
